package com.xinhuajs.articlemg.dao.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.xinhuajs.articlemg.dao.IInvcodeDAO;
import com.xinhuajs.articlemg.mapper.InvcodeMapper;
import com.xinhuajs.articlemg.model.IcRegiDetail;
import com.xinhuajs.articlemg.model.InvcodeInfo;
import com.xinhuajs.articlemg.pojo.Area;
import com.xinhuajs.articlemg.pojo.Invcode;
import com.xinhuajs.articlemg.pojo.Typecode;

@Repository("invcodeDAO")
public class InvcodeDAOImpl implements IInvcodeDAO {
	 @Autowired
	 private InvcodeMapper invcodeMapper;
	 
	@Override
	public int getInvcodeCount(Map<String, Object> paramMap) {
		// TODO Auto-generated method stub
		return invcodeMapper.getInvcodeCount(paramMap);
	}

	@Override
	public List<InvcodeInfo> getInvcodeInfoByPage(Map<String, Object> paramMap) {
		// TODO Auto-generated method stub
		return invcodeMapper.getInvcodeInfoByPage(paramMap);
	}

	@Override
	public void addTypecode(Typecode typecode) {
		// TODO Auto-generated method stub
		 invcodeMapper.addTypecode(typecode);;
	}

	@Override
	public void addInvcode(Invcode invc) {
		// TODO Auto-generated method stub
		invcodeMapper.addInvcode(invc);
	}

	@Override
	public List<Area> getAllCities() {
		// TODO Auto-generated method stub
		return invcodeMapper.getAllCities();
	}

	@Override
	public List<Area> getAllAreasByCity(String pcode) {
		// TODO Auto-generated method stub
		return invcodeMapper.getAllAreasByCity(pcode);
	}

	@Override
	public int getIcRegiDetlCount(Map<String, Object> paramMap) {
		// TODO Auto-generated method stub
		return invcodeMapper.getIcRegiDetlCount(paramMap);
	}

	@Override
	public List<IcRegiDetail> getIcRegiDetlByPage(Map<String, Object> paramMap) {
		// TODO Auto-generated method stub
		return invcodeMapper.getIcRegiDetlByPage(paramMap);
	}

	@Override
	public boolean deleteIcByInvid(String invid) {
		// TODO Auto-generated method stub
		int row=-1;
		row=invcodeMapper.deleteIcByInvid(invid);
		return row==1;
	}

	@Override
	public boolean updateIcStat(Invcode invcode) {
		// TODO Auto-generated method stub
		int row=-1;
		row=invcodeMapper.updateIcStat(invcode);
		return row==1;
	}

	
	@Override
	public Invcode getIcByInvid(String invid) {
		// TODO Auto-generated method stub
		return invcodeMapper.getIcByInvid(invid);
	}

	@Override
	public void updateIcUnit(Invcode invcode) {
		// TODO Auto-generated method stub
		invcodeMapper.updateIcUnit(invcode);
	}

	@Override
	public void updateTerminal(Map<String, Object> paramMap) {
		// TODO Auto-generated method stub
		invcodeMapper.updateTerminal(paramMap);;
	}
  
	
	
}
